.navbar {
    background-color: #fff;

    .navbar-box {
        display: flex;
        padding-top: 0.4rem;
        border-bottom: 1px solid #fcfcfc;
        line-height: 4rem;

        .navbar--item {
            position: relative;
            width: 100%;
            text-align: center;

            &::after {
                content: "";
                position: absolute;
                z-index: 1;
                left: 0;
                right: 0;
                bottom: 0;
                display: block;
                width: 36%;
                height: 4px;
                margin: auto;
                border-radius: 4px;
                background-color: $purple;
                transition: ease .2s;
                transform-origin: center center;
                transform: scaleX(0);
            }

            &.active {
                font-size: 1.8rem;
                font-weight: 800;

                &::after {
                    transform: scaleX(1);
                }
            }
        }

    }

}

.toolbar {
    background-color: #fff;

    .toolbar-box {
        display: flex;
        line-height: 5rem;
        color: #333;
        text-align: center;

        .toolbar--item {
            position: relative;
            width: 100%;
            color: #5a5a5a;

            &.disabled {
                color: #ddd;
                cursor: not-allowed;
                user-select: none;
            }

            &:not(:first-child)::after {
                content: '';
                position: absolute;
                z-index: 1;
                top: 0;
                bottom: 0;
                left: -1px;
                width: 0;
                height: 1.4rem;
                margin: auto;
                border-left: 1px solid #eee;
            }
        }
    }
}

.searchbar {
    background-color: $background;
    height: 0rem;
    transition: linear .2s;
    overflow: hidden;

    &.on {
        height: 5rem;
    }

    .searchbar-box {
        display: flex;
        padding: 1rem 2rem;

        .searchbar--write {
            flex: 1;
            width: 100%;

            .search--write-input {
                width: 100%;
                padding: 1rem;
                background-color: #fff;
                border: none;
                line-height: 2rem;
                height: 4rem;
                font-size: 1.6rem;
                caret-color: $purple;
            }
        }

        .searchbar--btn {
            margin-left: 1rem;
            line-height: 4rem;

            .search--btn-link {
                color: $purple;
                font-size: 1.6rem;
            }
        }
    }
}

.list {
    margin: 1rem 0;
    min-height: 50%;

    .list-box {
        width: 100%;
        color: #a6a6a6;
        background-color: #fff;

        .empty {
            position: relative;
            height: 30rem;

            &::after {
                content: '暂无数据';
                position: absolute;
                top: 10rem;
                left: 0;
                right: 0;
                margin: auto;
                text-align: center;
            }
        }

        .list--item {
            width: 100%;
            padding: 0 0 0 1.4rem;

            .list--item-box {
                padding: 1rem 1.4rem 2rem 0;
            }

            &:not(:first-child) {
                .list--item-box {
                    border-top: 1px solid #f0f0f0;
                }
            }
        }

        .list--item--title {
            display: flex;
            justify-content: space-between;
            align-items: center;

            .list--item--title-text {
                margin-right: 1rem;
                color: #000;
                font-weight: 800;
                vertical-align: middle;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                align-items: center;

                .badge {
                    margin-left: 6px;
                }

                &::before {
                    content: '';
                    display: inline-block;
                    width: 4px;
                    height: 1.4rem;
                    margin-right: 0.8rem;
                    border-radius: 0.6rem;
                    background-color: $purple;
                    vertical-align: -1px;
                }
            }

            .list--item--title-time {
                font-size: 90%;
                vertical-align: middle;
                font-weight: normal;
                white-space: nowrap;
            }
        }

        .list--item--content {
            display: flex;
            margin-top: 1.6rem;
            align-items: center;

            .list--item--content-avatar {
                flex-shrink: 0;
                align-self: flex-start;
                width: 5rem;
                height: 5rem;
                margin-right: 0.5rem;
                padding: {
                    right: 1rem;
                    bottom: 1rem;
                };

                img {
                    width: 100%;
                    height: 100%;
                    border-radius: 50%;
                }
            }

            .list--item--content-main {
                $spacing: 0.5rem;

                flex: 1;
                width: 100%;
                margin-top: -#{$spacing};
                overflow: hidden;

                p {
                    width: 100%;
                    margin: 0 0 0.4rem;
                    font-size: 90%;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }

                .list--item--content--title {
                    display: inline-flex;
                    margin-bottom: 0.8rem;
                    font-size: 115%;
                    color: #333;
                    justify-content: space-between;
                    align-items: baseline;
                    white-space: initial;
                    overflow: initial;
                    text-overflow: initial;

                    .label {
                        flex-shrink: 0;
                        margin-top: $spacing;
                    }

                    & > *:not(:first-child) {
                        margin-left: 1rem;
                    }
                }

            }
        }
    }

    .dropload-down {
        background-color: #fff;
    }
}

.half-screen-dialog {
    visibility: hidden;
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: linear 0.2s 0.2s;

    &.on {
        visibility: visible;
        opacity: 1;
        transition: linear 0.2s;
    }

    .half-screen-dialog--header {
        height: 2rem;
        text-align: center;
    }

    .half-screen-dialog--body {
        padding: 0 2rem 1rem;
        max-height: calc(100% - 7rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .half-screen-dialog--footer {
        position: absolute;
        z-index: 2;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
        padding: 1rem 2rem;

        .btn {
            padding: 0.4rem 1rem;
            font-size: 1.6rem;
        }
    }

    .half-screen-dialog-box {
        position: absolute;
        z-index: 1;
        top: 0;
        bottom: 0;
        right: -100%;
        width: 70%;
        height: 100%;
        background-color: #fff;

        .half-screen-dialog--access {

            &:not(:first-child) {
                margin-top: 2rem;
            }

        }

        .half-screen-dialog--access--title {
            position: relative;
            font-size: 1.4rem;
            line-height: 2rem;

            &::before {
                content: '';
                display: inline-block;
                width: 1rem;
                height: 1rem;
                border-radius: 50%;
                margin-right: 1rem;
                background-color: #ccc;
                line-height: 1rem;
                vertical-align: -1px;

            }

            &.primary::before {
                background-color: $purple;
            }

            &.success::before {
                background-color: $green;
            }

            &.warning::before {
                background-color: $yellow;
            }

            &.dark::before {
                background-color: $dark;
            }
        }

        .half-screen-dialog--access--content {
            display: grid;
            grid-template-columns: fit;
            grid-row-gap:1rem;
            grid-template-columns:repeat(auto-fill, 46%);
            justify-content: space-between;
            margin-top: 1rem;

            .btn {
                padding: 0 .2rem;
                width: 100%;
                height: 4rem;
                font-size: 1.2rem;
            }

            & > li {
                line-height: 1rem;
            }
        }

    }
}